home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 3.1 KB | 104 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: SLRegion.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef SLREGION_H
- #define SLREGION_H
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef SLPTRECT_H
- #include "SLPtRect.h"
- #endif
-
- #ifndef SLSTRMRW_H
- #include "SLStrmRW.h"
- #endif
-
- // ----- OpenDoc Includes -----
-
- #ifndef FWODTYPS_H
- #include "FWODTyps.h"
- #endif
-
- //========================================================================================
- // Region functions
- //========================================================================================
-
- // Export or Import functions for CFM-68K [sfu]
-
- #if defined(FW_ODFLIB_IMPORT)
- #pragma import on
- #elif defined(FW_ODFLIB)
- #pragma export on
- #endif
-
- FW_EXTERN_C_BEGIN
-
- // ----- Region creation
-
- ODRgnHandle SL_API FW_NewRegion();
- ODRgnHandle SL_API FW_CreateRectRegion(const FW_SRect& rect);
- ODRgnHandle SL_API FW_CreateOvalRegion(const FW_SRect& oval);
- ODRgnHandle SL_API FW_CreateRoundRectRegion(const FW_SRect& oval, const FW_SPoint& ovalSize);
- ODRgnHandle SL_API FW_CreateArcRegion(const FW_SRect& rect, short startAngle, short arcAngle);
- ODRgnHandle SL_API FW_CreatePolygonRegion(unsigned long pointCount, const FW_SPoint* pointArray);
- ODRgnHandle SL_API FW_CreateLineRegion(const FW_SPoint& startPt, const FW_SPoint& endPt, const FW_SPoint& lineThickness);
-
- // ----- Dispose
-
- void SL_API FW_DisposeRegion(ODRgnHandle rgnHandle);
-
- // ----- Copy
-
- ODRgnHandle SL_API FW_CopyRegion(ODRgnHandle srcRgn);
- void SL_API FW_CopyRegionTo(ODRgnHandle srcRgn, ODRgnHandle dstRgn);
-
- // ----- Bounding Box
-
- void SL_API FW_GetRegionBoundingBox(ODRgnHandle rgn, FW_SRect& rect);
-
- // ----- Misc operations
-
- void SL_API FW_OutlineRegion(ODRgnHandle rgn, FW_Fixed outlineSize);
- void SL_API FW_EmptyRegion(ODRgnHandle rgn);
- void SL_API FW_InsetRegion(ODRgnHandle rgn, FW_Fixed x, FW_Fixed y);
- void SL_API FW_MapRegion(ODRgnHandle rgn, const FW_SRect& srcRect, const FW_SRect& dstRect);
- void SL_API FW_OffsetRegion(ODRgnHandle rgn, FW_Fixed x, FW_Fixed y);
-
- // ----- Tests
-
- FW_Boolean SL_API FW_PointInRegion(ODRgnHandle rgn, const FW_SPoint& point);
- FW_Boolean SL_API FW_RectInRegion(ODRgnHandle rgn, const FW_SRect& rect);
- FW_Boolean SL_API FW_IsEmptyRegion(ODRgnHandle rgn);
-
- // ----- Read/Write -----
-
- void SL_API FW_WriteRegion(ODRgnHandle rgnHandle, FW_HWritableStream stream, FW_PlatformError* error);
- ODRgnHandle SL_API FW_ReadRegion(FW_HReadableStream stream, FW_PlatformError* error);
-
- // ----- Region Operations -----
- ODRgnHandle SL_API FW_UnionRegion(ODRgnHandle rgn1, ODRgnHandle rgn2);
- ODRgnHandle SL_API FW_XorRegion(ODRgnHandle rgn1, ODRgnHandle rgn2);
- ODRgnHandle SL_API FW_SubtractRegion(ODRgnHandle rgn1, ODRgnHandle rgn2); // rgn1 - rgn2
- ODRgnHandle SL_API FW_IntersectRegion(ODRgnHandle rgn1, ODRgnHandle rgn2);
-
- FW_EXTERN_C_END
-
- // For CFM-68K [sfu]
-
- #if defined(FW_ODFLIB_IMPORT)
- #pragma import off
- #elif defined(FW_ODFLIB)
- #pragma export off
- #endif
-
- #endif // SLREGION_H
-